package com.springboot.service.Impl;

import com.springboot.mapper.UserMapper;
import com.springboot.model.User;
import com.springboot.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Description TODO
 * @Date 2022/3/2 23:43
 * @Version 1.0
 */
@Service
public class UserServiceImpl implements UserService {

    @Resource
    private UserMapper userMapper;

    /**
     * 查询数据库，验证用户是否存在
     *
     * @param loginUser
     * @param loginPwd
     * @return
     */
    @Override
    public User selectUserByNameAndPwd(String loginUser, String loginPwd) {
        //从数据库查询

        User result = userMapper.selectByPrimaryKey(loginUser,loginPwd);

        return result;
    }
}
